export default [
  {
    path: '/user',
    layout: false,
    routes: [{ name: '登录', path: '/user/login', component: './User/Login' }],
  },
  { path: '/api-facade', name: 'API 接口文档', icon: 'smile', component: './ApiFacade' },
  {
    path: '/user/center',
    name: '个人中心',
    icon: 'smile',
    component: './UserCenter',
    // https://umijs.org/docs/max/layout-menu#hideinxxx
    hideInMenu: true,
  },
  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    routes: [
      { path: '/admin', redirect: '/admin/api-list' },
      { name: '接口查询', icon: 'table', path: '/admin/api-list', component: './ApiList' },
      { name: '接口分析', icon: 'table', path: '/admin/api-analysis', component: './ApiAnalysis' },
    ],
  },
  // { name: '查询表格', icon: 'table', path: '/list', component: './TableList' },
  // { name: '接口查询', icon: 'table', path: '/api-list', component: './ApiList' },
  { path: '/', redirect: '/api-facade' },
  { path: '*', layout: false, component: './404' },
];
